<template>
  <div class="merchant-container">
    <!-- 导航栏 -->
    <nav class="navbar">
      <div class="navbar-brand">
        <h1>🏪 商户管理中心</h1>
      </div>
      <div class="navbar-user">
        <div class="user-info">
          <span class="user-avatar">🍽️</span>
          <span class="user-name">{{ merchantInfo.name || '商户' }}</span>
        </div>
        <button class="logout-btn" @click="handleLogout">退出登录</button>
      </div>
    </nav>

    <!-- 主体内容 -->
    <div class="content-wrapper">
      <!-- 侧边栏导航 -->
      <aside class="sidebar">
        <ul class="sidebar-menu">
          <li class="menu-item" :class="{ active: activeTab === 'dashboard' }" @click="activeTab = 'dashboard'">
            <span class="menu-icon">📊</span>
            <span class="menu-text">数据概览</span>
          </li>
          <li class="menu-item" :class="{ active: activeTab === 'menu' }" @click="activeTab = 'menu'">
            <span class="menu-icon">🍽️</span>
            <span class="menu-text">菜单管理</span>
          </li>
          <li class="menu-item" :class="{ active: activeTab === 'orders' }" @click="activeTab = 'orders'">
            <span class="menu-icon">📋</span>
            <span class="menu-text">订单管理</span>
          </li>
          <li class="menu-item" :class="{ active: activeTab === 'info' }" @click="activeTab = 'info'">
            <span class="menu-icon">🏪</span>
            <span class="menu-text">商户信息</span>
          </li>
          <li class="menu-item" :class="{ active: activeTab === 'schedule' }" @click="activeTab = 'schedule'">
            <span class="menu-icon">⏰</span>
            <span class="menu-text">营业时间</span>
          </li>
          <li class="menu-item" :class="{ active: activeTab === 'feedback' }" @click="activeTab = 'feedback'">
            <span class="menu-icon">💬</span>
            <span class="menu-text">用户反馈</span>
          </li>
        </ul>
      </aside>

      <!-- 主内容区域 -->
      <main class="content">
        <!-- 数据概览 -->
        <div v-if="activeTab === 'dashboard'" class="dashboard-content">
          <h2>数据概览</h2>
          
          <!-- 统计卡片 -->
          <div class="stats-cards">
            <div class="stat-card">
              <div class="stat-icon">💰</div>
              <div class="stat-info">
                <div class="stat-value">{{ todayRevenue }}</div>
                <div class="stat-label">今日营收</div>
              </div>
            </div>
            <div class="stat-card">
              <div class="stat-icon">📋</div>
              <div class="stat-info">
                <div class="stat-value">{{ todayOrders }}</div>
                <div class="stat-label">今日订单</div>
              </div>
            </div>
            <div class="stat-card">
              <div class="stat-icon">👥</div>
              <div class="stat-info">
                <div class="stat-value">{{ todayCustomers }}</div>
                <div class="stat-label">今日顾客</div>
              </div>
            </div>
            <div class="stat-card">
              <div class="stat-icon">⭐</div>
              <div class="stat-info">
                <div class="stat-value">{{ averageRating }}</div>
                <div class="stat-label">平均评分</div>
              </div>
            </div>
          </div>

          <!-- 趋势图表 -->
          <div class="charts-section">
            <div class="chart-card">
              <h3>近7日营收趋势</h3>
              <div class="chart-placeholder">
                <p>📈 营收趋势图表</p>
              </div>
            </div>
            <div class="chart-card">
              <h3>热销菜品排行</h3>
              <div class="chart-placeholder">
                <p>🏆 热销菜品排行榜</p>
              </div>
            </div>
          </div>
        </div>

        <!-- 菜单管理 -->
        <div v-else-if="activeTab === 'menu'" class="menu-content">
          <div class="section-header">
            <h2>菜单管理</h2>
            <button class="add-btn" @click="showAddItemModal = true">+ 添加菜品</button>
          </div>
          
          <!-- 菜单列表 -->
          <div class="menu-list">
            <div class="menu-item" v-for="(item, index) in menuItems" :key="index">
              <div class="menu-item-info">
                <div class="menu-item-name">{{ item.name }}</div>
                <div class="menu-item-desc">{{ item.description }}</div>
                <div class="menu-item-price">¥{{ item.price.toFixed(2) }}</div>
              </div>
              <div class="menu-item-actions">
                <span class="menu-item-status" :class="{ active: item.active }">
                  {{ item.active ? '在售' : '已下架' }}
                </span>
                <button class="edit-btn" @click="editMenuItem(index)">编辑</button>
                <button class="delete-btn" @click="deleteMenuItem(index)">删除</button>
              </div>
            </div>
          </div>
        </div>

        <!-- 订单管理 -->
        <div v-else-if="activeTab === 'orders'" class="orders-content">
          <div class="section-header">
            <h2>订单管理</h2>
            <div class="order-filter">
              <select v-model="orderStatusFilter">
                <option value="all">全部订单</option>
                <option value="pending">待处理</option>
                <option value="processing">处理中</option>
                <option value="completed">已完成</option>
                <option value="cancelled">已取消</option>
              </select>
            </div>
          </div>
          
          <!-- 订单列表 -->
          <div class="orders-list">
            <div class="order-item" v-for="(order, index) in filteredOrders" :key="index">
              <div class="order-header">
                <span class="order-id">订单号: {{ order.id }}</span>
                <span class="order-time">{{ formatDate(order.time) }}</span>
              </div>
              <div class="order-content">
                <div class="order-foods">
                  <div v-for="(food, idx) in order.foods" :key="idx" class="order-food-item">
                    {{ food.name }} × {{ food.quantity }}
                  </div>
                </div>
                <div class="order-info">
                  <div class="order-total">总计: ¥{{ order.total.toFixed(2) }}</div>
                  <div class="order-status" :class="order.status">
                    {{ getStatusText(order.status) }}
                  </div>
                </div>
              </div>
              <div class="order-actions" v-if="order.status === 'pending'">
                <button class="accept-btn" @click="acceptOrder(index)">接受订单</button>
                <button class="reject-btn" @click="rejectOrder(index)">拒绝订单</button>
              </div>
            </div>
          </div>
        </div>

        <!-- 商户信息 -->
        <div v-else-if="activeTab === 'info'" class="info-content">
          <h2>商户信息</h2>
          <form class="info-form" @submit.prevent="updateMerchantInfo">
            <div class="form-group">
              <label>商户名称</label>
              <input type="text" v-model="merchantInfo.name" required />
            </div>
            <div class="form-group">
              <label>商户描述</label>
              <textarea v-model="merchantInfo.description" rows="3"></textarea>
            </div>
            <div class="form-group">
              <label>联系方式</label>
              <input type="tel" v-model="merchantInfo.phone" required />
            </div>
            <div class="form-group">
              <label>地址</label>
              <input type="text" v-model="merchantInfo.location" required />
            </div>
            <div class="form-group">
              <label>营业时间</label>
              <input type="text" v-model="merchantInfo.businessHours" />
            </div>
            <button type="submit" class="save-btn">保存修改</button>
          </form>
        </div>

        <!-- 营业时间 -->
        <div v-else-if="activeTab === 'schedule'" class="schedule-content">
          <h2>营业时间设置</h2>
          <div class="schedule-form">
            <div class="schedule-item" v-for="(day, index) in businessDays" :key="index">
              <div class="day-name">{{ day.name }}</div>
              <div class="day-toggle">
                <label class="toggle">
                  <input type="checkbox" v-model="day.isOpen" />
                  <span class="toggle-slider"></span>
                </label>
              </div>
              <div class="day-hours" v-if="day.isOpen">
                <input type="time" v-model="day.openTime" />
                <span>至</span>
                <input type="time" v-model="day.closeTime" />
              </div>
            </div>
            <button class="save-btn" @click="saveSchedule">保存设置</button>
          </div>
        </div>

        <!-- 用户反馈 -->
        <div v-else-if="activeTab === 'feedback'" class="feedback-content">
          <h2>用户反馈</h2>
          <div class="feedback-list">
            <div class="feedback-item" v-for="(feedback, index) in feedbacks" :key="index">
              <div class="feedback-header">
                <span class="feedback-user">{{ feedback.user }}</span>
                <span class="feedback-rating">
                  {{ '⭐'.repeat(feedback.rating) }}
                </span>
                <span class="feedback-date">{{ formatDate(feedback.date) }}</span>
              </div>
              <div class="feedback-content">
                {{ feedback.content }}
              </div>
              <div class="feedback-reply" v-if="feedback.reply">
                <div class="reply-label">回复:</div>
                <div class="reply-content">{{ feedback.reply }}</div>
              </div>
              <button class="reply-btn" v-if="!feedback.reply" @click="replyFeedback(index)">回复</button>
            </div>
          </div>
        </div>
      </main>
    </div>

    <!-- 页脚 -->
    <footer class="footer">
      <p>&copy; 2025 高校职工就餐系统 - 商户管理平台</p>
    </footer>
  </div>
</template>

<script>
import { ref, reactive, computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'

export default {
  name: 'MerchantPage',
  setup() {
    const router = useRouter()
    const activeTab = ref('dashboard')
    
    // 商户信息
    const merchantInfo = reactive({
      name: '风味餐厅',
      description: '提供美味可口的教职工餐食',
      phone: '13800138000',
      location: '第一食堂二楼',
      businessHours: '06:30-13:30, 16:30-19:30'
    })
    
    // 统计数据
    const todayRevenue = ref(1280.50)
    const todayOrders = ref(45)
    const todayCustomers = ref(68)
    const averageRating = ref(4.5)
    
    // 菜单数据
    const menuItems = ref([
      { name: '宫保鸡丁', description: '经典川菜，香辣可口', price: 18.00, active: true },
      { name: '鱼香肉丝', description: '甜辣风味，口感丰富', price: 16.00, active: true },
      { name: '糖醋排骨', description: '酸甜可口，肉质鲜嫩', price: 22.00, active: true },
      { name: '青椒土豆丝', description: '清爽开胃，营养健康', price: 12.00, active: true },
      { name: '番茄鸡蛋汤', description: '酸甜可口，营养丰富', price: 8.00, active: true }
    ])
    
    // 订单数据
    const orders = ref([
      {
        id: '20250120001',
        time: new Date(),
        foods: [
          { name: '宫保鸡丁', quantity: 1 },
          { name: '番茄鸡蛋汤', quantity: 1 }
        ],
        total: 26.00,
        status: 'pending'
      },
      {
        id: '20250120002',
        time: new Date(Date.now() - 1000 * 60 * 30),
        foods: [
          { name: '鱼香肉丝', quantity: 1 },
          { name: '青椒土豆丝', quantity: 1 }
        ],
        total: 28.00,
        status: 'processing'
      },
      {
        id: '20250120003',
        time: new Date(Date.now() - 1000 * 60 * 60),
        foods: [
          { name: '糖醋排骨', quantity: 1 }
        ],
        total: 22.00,
        status: 'completed'
      }
    ])
    
    // 订单状态筛选
    const orderStatusFilter = ref('all')
    const filteredOrders = computed(() => {
      if (orderStatusFilter.value === 'all') return orders.value
      return orders.value.filter(order => order.status === orderStatusFilter.value)
    })
    
    // 营业日期设置
    const businessDays = ref([
      { name: '周一', isOpen: true, openTime: '06:30', closeTime: '13:30' },
      { name: '周二', isOpen: true, openTime: '06:30', closeTime: '13:30' },
      { name: '周三', isOpen: true, openTime: '06:30', closeTime: '13:30' },
      { name: '周四', isOpen: true, openTime: '06:30', closeTime: '13:30' },
      { name: '周五', isOpen: true, openTime: '06:30', closeTime: '13:30' },
      { name: '周六', isOpen: true, openTime: '08:00', closeTime: '14:00' },
      { name: '周日', isOpen: false, openTime: '08:00', closeTime: '14:00' }
    ])
    
    // 反馈数据
    const feedbacks = ref([
      {
        user: '张老师',
        rating: 5,
        date: new Date(Date.now() - 1000 * 60 * 60 * 24),
        content: '菜品很美味，服务态度也很好！',
        reply: ''
      },
      {
        user: '李老师',
        rating: 4,
        date: new Date(Date.now() - 1000 * 60 * 60 * 48),
        content: '价格合理，希望能增加更多菜品选择。',
        reply: '感谢您的建议，我们会定期更新菜单！'
      }
    ])
    
    // 格式化日期
    const formatDate = (date) => {
      return new Date(date).toLocaleString('zh-CN', {
        year: 'numeric',
        month: '2-digit',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit'
      })
    }
    
    // 获取订单状态文本
    const getStatusText = (status) => {
      const statusMap = {
        pending: '待处理',
        processing: '处理中',
        completed: '已完成',
        cancelled: '已取消'
      }
      return statusMap[status] || status
    }
    
    // 更新商户信息
    const updateMerchantInfo = () => {
      alert('商户信息更新成功！')
    }
    
    // 编辑菜单项
    const editMenuItem = (index) => {
      alert(`编辑菜品: ${menuItems.value[index].name}`)
    }
    
    // 删除菜单项
    const deleteMenuItem = (index) => {
      if (confirm(`确定要删除菜品"${menuItems.value[index].name}"吗？`)) {
        menuItems.value.splice(index, 1)
      }
    }
    
    // 接受订单
    const acceptOrder = (index) => {
      orders.value[index].status = 'processing'
      alert('订单已接受！')
    }
    
    // 拒绝订单
    const rejectOrder = (index) => {
      orders.value[index].status = 'cancelled'
      alert('订单已拒绝！')
    }
    
    // 保存营业时间表
    const saveSchedule = () => {
      alert('营业时间表已保存！')
    }
    
    // 回复反馈
    const replyFeedback = (index) => {
      const reply = prompt('请输入回复内容：')
      if (reply) {
        feedbacks.value[index].reply = reply
      }
    }
    
    // 退出登录
    const handleLogout = () => {
      if (confirm('确定要退出登录吗？')) {
        localStorage.removeItem('user')
        router.push('/login')
      }
    }
    
    return {
      activeTab,
      merchantInfo,
      todayRevenue,
      todayOrders,
      todayCustomers,
      averageRating,
      menuItems,
      orders,
      orderStatusFilter,
      filteredOrders,
      businessDays,
      feedbacks,
      formatDate,
      getStatusText,
      updateMerchantInfo,
      editMenuItem,
      deleteMenuItem,
      acceptOrder,
      rejectOrder,
      saveSchedule,
      replyFeedback,
      handleLogout
    }
  }
}
</script>

<style scoped>
.merchant-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
  background-color: #2c3e50;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-brand h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  font-size: 24px;
}

.user-name {
  font-weight: 500;
}

.logout-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 内容包装器 */
.content-wrapper {
  display: flex;
  flex: 1;
}

/* 侧边栏样式 */
.sidebar {
  width: 250px;
  background-color: white;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.menu-item:hover {
  background-color: #f8f9fa;
}

.menu-item.active {
  background-color: #2c3e50;
  color: white;
}

.menu-icon {
  font-size: 18px;
  margin-right: 15px;
}

.menu-text {
  font-size: 16px;
  font-weight: 500;
}

/* 主内容区域 */
.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.content h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 24px;
}

/* 区域头部 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-btn:hover {
  background-color: #229954;
}

/* 统计卡片 */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-icon {
  font-size: 36px;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.stat-label {
  font-size: 14px;
  color: #7f8c8d;
}

/* 图表区域 */
.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.chart-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 18px;
}

.chart-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 4px;
  color: #7f8c8d;
}

/* 菜单列表 */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-item-info {
  flex: 1;
}

.menu-item-name {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.menu-item-desc {
  color: #7f8c8d;
  margin-bottom: 10px;
}

.menu-item-price {
  font-size: 20px;
  font-weight: 600;
  color: #e74c3c;
}

.menu-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  background-color: #e74c3c;
  color: white;
}

.menu-item-status.active {
  background-color: #27ae60;
}

.edit-btn, .delete-btn {
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.edit-btn {
  background-color: #3498db;
  color: white;
}

.edit-btn:hover {
  background-color: #2980b9;
}

.delete-btn {
  background-color: #e74c3c;
  color: white;
}

.delete-btn:hover {
  background-color: #c0392b;
}

/* 订单列表 */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.order-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.order-id {
  font-weight: 600;
  color: #2c3e50;
}

.order-time {
  color: #7f8c8d;
  font-size: 14px;
}

.order-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.order-foods {
  flex: 1;
}

.order-food-item {
  margin-bottom: 5px;
}

.order-info {
  text-align: right;
}

.order-total {
  font-size: 18px;
  font-weight: 600;
  color: #e74c3c;
  margin-bottom: 5px;
}

.order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  display: inline-block;
}

.order-status.pending {
  background-color: #f39c12;
  color: white;
}

.order-status.processing {
  background-color: #3498db;
  color: white;
}

.order-status.completed {
  background-color: #27ae60;
  color: white;
}

.order-status.cancelled {
  background-color: #e74c3c;
  color: white;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.accept-btn, .reject-btn {
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

.accept-btn {
  background-color: #27ae60;
  color: white;
}

.accept-btn:hover {
  background-color: #229954;
}

.reject-btn {
  background-color: #e74c3c;
  color: white;
}

.reject-btn:hover {
  background-color: #c0392b;
}

/* 表单样式 */
.info-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.save-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.save-btn:hover {
  background-color: #229954;
}

/* 营业时间设置 */
.schedule-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.schedule-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.schedule-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.day-name {
  width: 80px;
  font-weight: 500;
  color: #2c3e50;
}

.day-toggle {
  margin-right: 20px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #27ae60;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.day-hours {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-hours input {
  width: 80px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* 反馈列表 */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feedback-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.feedback-user {
  font-weight: 600;
  color: #2c3e50;
}

.feedback-rating {
  color: #f39c12;
}

.feedback-date {
  color: #7f8c8d;
  font-size: 14px;
  margin-left: auto;
}

.feedback-content {
  margin-bottom: 15px;
  line-height: 1.6;
}

.feedback-reply {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.reply-label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #2c3e50;
}

.reply-content {
  line-height: 1.6;
}

.reply-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.reply-btn:hover {
  background-color: #2980b9;
}

/* 页脚样式 */
.footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
  }
  
  .menu-item {
    white-space: nowrap;
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
  }
  
  .stats-cards,
  .charts-section {
    grid-template-columns: 1fr;
  }
  
  .order-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .order-info {
    text-align: left;
  }
  
  .schedule-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
</style>